package com.gblfy.ws.service.impl;

import com.gblfy.ws.service.IXfireService;
import com.gblfy.ws.utils.SpringBootBeanAutowiringSupport;
import org.springframework.stereotype.Service;

import javax.jws.WebService;
import javax.xml.ws.BindingType;
import javax.xml.ws.soap.SOAPBinding;
/**
 * Xfire接口实现类
 *
 * @author gblfy
 * @date 2021-09-17
 */

/**
 * serviceName:?wsdl前缀
 * targetNamespace:命名空间
 * name:无实际意义
 */
@WebService(serviceName = "xfireServiceShell", name = "xfireService",
        targetNamespace = "http://impl.service.ws.gblfy.com")
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
@Service
//继承SpringBootBeanAutowiringSupport 可以让@Autowired注入成功，我重写了WebApplicationContextLocator的onStartup方法
public class XfireServiceImpl extends SpringBootBeanAutowiringSupport implements IXfireService {

    /**
     * @param info
     * @return
     */
    @Override
    public String sayHello(String info) {
        return "sayHello:" + info;
    }

    @Override
    public String sayHello2(String info, String info2) {
        return info + info2;
    }
}
